diff options
| author | Adam Soltys <[email protected]> | 2022-11-03 15:57:03 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-03 15:57:03 -0700 |
| commit | bf925a332a7fde8b19f5eea677dcb0346805facd (patch) | |
| tree | 1524ee617a25935b385a8f7d21865b29f0589e6a /src/routes/(app)/[username] | |
| parent | d608c466c30019c4cc7d038f2308ac0e5b204841 (diff) | |
| download | coinos-ui-bf925a332a7fde8b19f5eea677dcb0346805facd.tar.gz coinos-ui-bf925a332a7fde8b19f5eea677dcb0346805facd.zip | |
display tips
Diffstat (limited to 'src/routes/(app)/[username]')
| -rw-r--r-- | src/routes/(app)/[username]/+page.svelte | 22 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/dashboard/+page.svelte | 2 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/transactions/[...page]/+page.svelte | 37 |
3 files changed, 37 insertions, 24 deletions
diff --git a/src/routes/(app)/[username]/+page.svelte b/src/routes/(app)/[username]/+page.svelte index 6bab769b..a32d2238 100644 --- a/src/routes/(app)/[username]/+page.svelte +++ b/src/routes/(app)/[username]/+page.svelte @@ -44,19 +44,19 @@ {subject.address && subject.address !== 'null' ? subject.address : ''} </p> - <div class="menu"> - <button on:click={() => (followed = !followed)}> - {$t('user.' + (followed ? 'following' : 'follow'))} - </button> + <div class="menu"> + <button on:click={() => (followed = !followed)}> + {$t('user.' + (followed ? 'following' : 'follow'))} + </button> - <a href={`/${subject.username}/receive`}> - <button> Pay </button> - </a> + <a href={`/${subject.username}/receive`}> + <button> Pay </button> + </a> - <a href={`/${subject.username}/request`}> - <button> Request invoice </button> - </a> - </div> + <a href={`/${subject.username}/request`}> + <button> Request invoice </button> + </a> + </div> </div> <div class="space-y-5 md:mt-20 mx-auto w-[350px]"> diff --git a/src/routes/(app)/[username]/dashboard/+page.svelte b/src/routes/(app)/[username]/dashboard/+page.svelte index fe685cc7..93fac986 100644 --- a/src/routes/(app)/[username]/dashboard/+page.svelte +++ b/src/routes/(app)/[username]/dashboard/+page.svelte @@ -48,7 +48,7 @@ </div> <div class="text-secondary text-2xl"> - {sat(user.account.balance)} + {sat(user.account.balance)} </div> <div class="grid sm:grid-cols-2 gap-2 mt-8"> diff --git a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte index 32c0970d..da023c3d 100644 --- a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte +++ b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte @@ -110,30 +110,43 @@ <div class="space-y-10"> {#if transactions.length} {#each transactions as tx} - <div class="grid grid-cols-5 border-b pb-5"> - <div> - <div class="mb-1 font-bold">{f(tx.amount * (tx.rate / sats), tx.currency)}</div> + <div class="grid grid-cols-3 border-b pb-5"> + <div class="whitespace-nowrap"> + <div class="mb-1 font-bold"> + {f(tx.amount * (tx.rate / sats), tx.currency)} - <span class="text-secondary">{sat(tx.amount)} </span> + {#if tx.tip} + <span class="text-sm"> + +{f(tx.tip * (tx.rate / sats), tx.currency)} + </span> + {/if} + </div> + + <span class="text-secondary" + >{sat(tx.amount)} + + {#if tx.tip} + <span class="text-sm"> + +{sat(tx.tip)} + </span> + {/if} + </span> </div> - <div class="flex col-span-3"> + <div class="flex"> {#if tx.with} <a href={`/${tx.with.username}`} class="mx-auto"> <div class="flex"> - <div class="my-auto text-secondary"> - {tx.amount > 0 ? 'From' : 'To'} - </div> <div class="my-auto"> <Avatar user={tx.with} size={12} /> </div> <div class="my-auto ml-1 text-secondary">{tx.with.username}</div> </div> </a> - {:else} - <div class="mx-auto text-secondary"> - {tx.amount > 0 ? 'Received' : 'Sent'} - </div> + {:else} + <div class="mx-auto text-secondary"> + {tx.amount > 0 ? 'Received' : 'Sent'} + </div> {/if} </div> |
